package org.haifi.game.job;

import org.haifi.game.channel.GameExecutorRouter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 每小时执行一次
 * 
 * @author joycube2
 * 
 */
@Component
public class HourJob extends BaseJob {

	@Override
	protected void doWork() {

		try {
			// 定时清空已经离线玩家的ordered tasks
			gameExecutorRouter.cleanEmptyTasks();
		} catch (Exception e) {
			log.error("ERROR", e);
		}
	}

	@Autowired
	private GameExecutorRouter gameExecutorRouter;
}
